package com.hackintosh.simple;

/**
 * @description：发起人
 * @author：twislyn
 * @date：Created in 2021/06/06
 * @modified By：
 * @version: 1.0
 */
public class Originator {
    private String state;

    public Originator(String state) {
        this.state = state;
    }

    public String getState() {
        return state;
    }

    public void setState(String state) {
        this.state = state;
    }

    public Memento createMemento(){
       return new Memento(state);
    }

    public void restoreMemento(Memento memento){
        this.setState(memento.getState());
    }
}
